#!/usr/bin/perl

require "./mailadmin-lib.pl";
&ReadParse();

my ($dname, $err_msg);

$dname = $in{'dname'};

unless ($dname)
{
    $err_msg = $text{'msg_dname_empty'};
    goto ERROR_OUT;
}

$err_msg = &delete_domain($dname);
if ($err_msg)
{
    goto ERROR_OUT;
}

&redirect("list_domain.cgi");

ERROR_OUT:;

my (@headp, @footp);
@headp = ($text{'error'}, "");
@footp = ("list_domain.cgi", $text{'back_lsdomain'});
&mail_error(\@headp, \@footp, $text{'err_title_save_delete_domain'}, $err_msg);


